string = '0123456789'
#1.取出01234
#2.取出89
#3.取出98
#4.取出02468
#5.取出13579
#6.取出86420
#7.取出97531
#8.取出87
#9.取出987654321
print(string[0:5])
print(string[8:])
print(string[9:7:-1])
print(string[::2])
print(string[1::2])
print(string[8::-2])
print(string[::-2])
print(string[8:6:-1])
print(string[:0:-1])

# py = "dome.py"
# txt = "a.txt"
# a="_副本"
#
# new_py = list(py)
# new_txt = list(txt)
# new_py.insert(4,a)
# new_txt.insert(1,a)
# p1= "".join(new_py)
# p2="".join(new_txt)
# print(p1)
# print(p2)
